package modelImp;

import java.awt.Point;
import java.io.File;
import java.io.IOException;
import java.util.Vector;
import javax.imageio.ImageIO;

import model.AbstractFactoryExpansion;
import model.ModelConstraint;
import model.ModelPawn;
import model.ModelPosition;
import model.ModelTile;

public class BaseExpansion  implements AbstractFactoryExpansion{

	@Override
	public ModelTile makeFirstTile() {
		String path = System.getProperty("user.dir")+File.separator+"bin"+File.separator+"ressources"+File.separator;
		Field champs0 = new Field();
		Field champs1 = new Field();
		Path road0 = new Path();
		Town city0 = new Town();
		Vector<ModelPosition> positionsD = new Vector<ModelPosition>();

		ModelConstraint[] cnorth = new ModelConstraint[3];
		cnorth[0] = champs0; cnorth[1] = road0; cnorth[2] = champs1;

		ModelConstraint[] ceast = new ModelConstraint[3];
		ceast[0] = city0; ceast[1] = city0; ceast[2] = city0;

		ModelConstraint[] cwest = new ModelConstraint[3];
		cwest[0] = champs0; cwest[1] = champs0; cwest[2] = champs0;

		ModelConstraint[] csouth = new ModelConstraint[3];
		csouth[0] = champs0; csouth[1] = road0; csouth[2] = champs1;



		Position pchampsD1 = new Position(null,champs0,new Point(18,48));
		Position proadD2 = new Position(null,road0,new Point(36,29));
		Position pchampsD3 = new Position(null,champs1,new Point(49,13));
		Position pcityD4 = new Position(null,city0,new Point(66,39));

		positionsD.add(pchampsD1);
		positionsD.add(proadD2);
		positionsD.add(pchampsD3);
		positionsD.add(pcityD4);

		Tile first;
		try {
			first = new Tile(ImageIO.read(new File(path+"tile-d.png")), null,cnorth,csouth,ceast,cwest,positionsD);
			return first;
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return null;
	}

	@Override
	public Vector<ModelPawn> makePawns() {
		Vector<ModelPawn> pawns = new Vector<ModelPawn>();
		for(int i=0;i<9;i++){
			pawns.add(new Pawn());
		}
		return pawns;
	}

	@Override
	public Vector<ModelTile> makeTiles() {
		Vector<ModelTile> vector = new Vector<ModelTile>();
		String path = System.getProperty("user.dir")+File.separator+"bin"+File.separator+"ressources"+File.separator;

		Vector<ModelPosition> positionsC = new Vector<ModelPosition>();

		//TO DO 2  tiles a
		//TO DO 4 tiles b
		//tile c TO DO - bouclier
		Town cityC = new Town();
		ModelConstraint[] cnorthC = new ModelConstraint[3];
		ModelConstraint[] ceastC = new ModelConstraint[3];
		ModelConstraint[] cwestC = new ModelConstraint[3];
		ModelConstraint[] csouthC = new ModelConstraint[3];
		for (int i = 0;i<3;i++)
		{
			cnorthC[i] = cityC;
			ceastC[i]= cityC;
			cwestC[i]=  cityC;
			csouthC[i]= cityC;
		}

		Position pcityC = new Position(null,cityC,new Point(41,42));


		positionsC.add(pcityC);


		try {
			vector.add(new Tile(ImageIO.read(new File(path+"tile-c.png")), null,cnorthC,csouthC,ceastC,cwestC,positionsC));
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

		//tile 3 d
		for(int i=0;i<3;i++)
		{
			Vector<ModelPosition> positionsD = new Vector<ModelPosition>();
			Field champsD0 = new Field();
			Field champsD1 = new Field();
			Path roadD0 = new Path();
			Town cityD0 = new Town();

			ModelConstraint[] cnorthD = new ModelConstraint[3];
			cnorthD[0] = champsD0; cnorthD[1] = roadD0; cnorthD[2] = champsD1;

			ModelConstraint[] ceastD = new ModelConstraint[3];
			ceastD[0] = cityD0; ceastD[1] = cityD0; ceastD[2] = cityD0;

			ModelConstraint[] cwestD = new ModelConstraint[3];
			cwestD[0] = champsD0; cwestD[1] = champsD0; cwestD[2] = champsD0;

			ModelConstraint[] csouthD = new ModelConstraint[3];
			csouthD[0] = champsD0; csouthD[1] = roadD0; csouthD[2] = champsD1;

			Position pchampsD1 = new Position(null,champsD0,new Point(18,48));
			Position proadD2 = new Position(null,roadD0,new Point(36,29));
			Position pchampsD3 = new Position(null,champsD1,new Point(49,13));
			Position pcityD4 = new Position(null,cityD0,new Point(66,39));

			positionsD.add(pchampsD1);
			positionsD.add(proadD2);
			positionsD.add(pchampsD3);
			positionsD.add(pcityD4);



			try {
				vector.add(new Tile(ImageIO.read(new File(path+"tile-d.png")), null,cnorthD,csouthD,ceastD,cwestD,positionsD));
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			} catch (Exception e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}
		//tile 5 e
		for(int i=0;i<5;i++)
		{
			Vector<ModelPosition> positionsE = new Vector<ModelPosition>();
			Field champsE = new Field();
			Town cityE = new Town();

			ModelConstraint[] cnorthE = new ModelConstraint[3];
			cnorthE[0] = cityE; cnorthE[1] = cityE; cnorthE[2] = cityE;

			ModelConstraint[] ceastE = new ModelConstraint[3];
			ceastE[0] = champsE; ceastE[1] = champsE; ceastE[2] = champsE;

			ModelConstraint[] cwestE = new ModelConstraint[3];
			cwestE[0] = champsE; cwestE[1] = champsE; cwestE[2] = champsE;

			ModelConstraint[] csouthE = new ModelConstraint[3];
			csouthE[0] = champsE; csouthE[1] = champsE; csouthE[2] = champsE;

			Position pchampsE = new Position(null,champsE,new Point(35,55));
			Position pcityE= new Position(null,cityE,new Point(42,12));

			positionsE.add(pchampsE);
			positionsE.add(pcityE);

			try {
				vector.add(new Tile(ImageIO.read(new File(path+"tile-e.png")), null,cnorthE,csouthE,ceastE,cwestE,positionsE));
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			} catch (Exception e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}

		//tile 2 f TO DO bouclier
		for(int i=0;i<2;i++)
		{
			Vector<ModelPosition> positionsF = new Vector<ModelPosition>();
			Field champsF0 = new Field();
			Field champsF1 = new Field();
			Town cityF = new Town();

			ModelConstraint[] cnorthF = new ModelConstraint[3];
			cnorthF[0] = champsF0; cnorthF[1] = champsF0; cnorthF[2] = champsF0;

			ModelConstraint[] ceastF = new ModelConstraint[3];
			ceastF[0] = cityF; ceastF[1] = cityF; ceastF[2] = cityF;

			ModelConstraint[] cwestF = new ModelConstraint[3];
			cwestF[0] = cityF; cwestF[1] = cityF; cwestF[2] = cityF;

			ModelConstraint[] csouthF = new ModelConstraint[3];
			csouthF[0] = champsF1; csouthF[1] = champsF1; csouthF[2] = champsF1;	

			Position pchampsF0 = new Position(null,champsF0,new Point(44,5));
			Position pcityF= new Position(null,cityF,new Point(49,32));
			Position pchampsF1 = new Position(null,champsF1,new Point(40,66));

			positionsF.add(pchampsF0);
			positionsF.add(pchampsF1);
			positionsF.add(pcityF);


			try {
				vector.add(new Tile(ImageIO.read(new File(path+"tile-f.png")), null,cnorthF,csouthF,ceastF,cwestF,positionsF));
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			} catch (Exception e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}

		//tile g

		Field champsG0 = new Field();
		Field champsG1 = new Field();
		Town cityG = new Town();
		Vector<ModelPosition> positionsG = new Vector<ModelPosition>();

		ModelConstraint[] cnorthG = new ModelConstraint[3];
		cnorthG[0] = cityG; cnorthG[1] = cityG; cnorthG[2] = cityG;

		ModelConstraint[] ceastG = new ModelConstraint[3];
		ceastG[0] = champsG0; ceastG[1] = champsG0; ceastG[2] = champsG0;

		ModelConstraint[] cwestG = new ModelConstraint[3];
		cwestG[0] = champsG1; cwestG[1] = champsG1; cwestG[2] = champsG1;

		ModelConstraint[] csouthG = new ModelConstraint[3];
		csouthG[0] = cityG; csouthG[1] = cityG; csouthG[2] = cityG;	

		Position pchampsG0 = new Position(null,champsG0,new Point(9,46));
		Position pcityG= new Position(null,cityG,new Point(48,30));
		Position pchampsG1 = new Position(null,champsG1,new Point(71,44));

		positionsG.add(pchampsG0);
		positionsG.add(pchampsG1);
		positionsG.add(pcityG);

		try {
			vector.add(new Tile(ImageIO.read(new File(path+"tile-g.png")), null,cnorthG,csouthG,ceastG,cwestG,positionsG));
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

		//tile 3 h
		for(int i=0;i<3;i++)
		{
			Field champsH = new Field();
			Town cityH1 = new Town();
			Town cityH2 = new Town();
			Vector<ModelPosition> positionsH = new Vector<ModelPosition>();


			ModelConstraint[] cnorthH = new ModelConstraint[3];
			cnorthH[0] = champsH; cnorthH[1] = champsH; cnorthH[2] = champsH;

			ModelConstraint[] ceastH = new ModelConstraint[3];
			ceastH[0] = cityH1; ceastH[1] = cityH1; ceastH[2] = cityH1;

			ModelConstraint[] cwestH = new ModelConstraint[3];
			cwestH[0] = cityH2; cwestH[1] = cityH2; cwestH[2] = cityH2;

			ModelConstraint[] csouthH= new ModelConstraint[3];
			csouthH[0] = champsH; csouthH[1] = champsH; csouthH[2] = champsH;	


			Position pcityH0 = new Position(null,cityH1,new Point(7,35));
			Position pcityH1= new Position(null,cityH2,new Point(68,43));
			Position pchampsH = new Position(null,champsH,new Point(38,48));

			positionsH.add(pcityH0);
			positionsH.add(pcityH1);
			positionsH.add(pchampsH);

			try {
				vector.add(new Tile(ImageIO.read(new File(path+"tile-h.png")), null,cnorthH,csouthH,ceastH,cwestH,positionsH));
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			} catch (Exception e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}

		//tile 2 i
		for(int i=0;i<2;i++)
		{
			Field champsI = new Field();
			Town cityI1 = new Town();
			Town cityI2 = new Town();
			Vector<ModelPosition> positionsI = new Vector<ModelPosition>();

			ModelConstraint[] cnorthI = new ModelConstraint[3];
			cnorthI[0] = champsI; cnorthI[1] = champsI; cnorthI[2] = champsI;

			ModelConstraint[] ceastI = new ModelConstraint[3];
			ceastI[0] = cityI1; ceastI[1] = cityI1; ceastI[2] = cityI1;

			ModelConstraint[] cwestI = new ModelConstraint[3];
			cwestI[0] = champsI; cwestI[1] = champsI; cwestI[2] = champsI;

			ModelConstraint[] csouthI = new ModelConstraint[3];
			csouthI[0] = cityI2; csouthI[1] = cityI2; csouthI[2] = cityI2;	

	
			Position pcityI0 = new Position(null,cityI1,new Point(73,36));
			Position pcityI1= new Position(null,cityI2,new Point(40,65));
			Position pchampsI = new Position(null,champsI,new Point(26,28));

			positionsI.add(pcityI0);
			positionsI.add(pcityI1);
			positionsI.add(pchampsI);

			
			try {
				vector.add(new Tile(ImageIO.read(new File(path+"tile-i.png")), null,cnorthI,csouthI,ceastI,cwestI,positionsI));
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			} catch (Exception e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}

		//tile 3 j
		for(int i=0;i<3;i++)
		{
			Field champsJ0 = new Field();
			Field champsJ1 = new Field();
			Town cityJ = new Town();
			Path roadJ = new Path();
			Vector<ModelPosition> positionsJ = new Vector<ModelPosition>();

			ModelConstraint[] cnorthJ = new ModelConstraint[3];
			cnorthJ[0] = cityJ; cnorthJ[1] = cityJ; cnorthJ[2] = cityJ;

			ModelConstraint[] ceastJ = new ModelConstraint[3];
			ceastJ[0] = champsJ1; ceastJ[1] = roadJ; ceastJ[2] = champsJ0;

			ModelConstraint[] cwestJ = new ModelConstraint[3];
			cwestJ[0] = champsJ1; cwestJ[1] = champsJ1; cwestJ[2] = champsJ1;

			ModelConstraint[] csouthJ = new ModelConstraint[3];
			csouthJ[0] = champsJ1; csouthJ[1] = roadJ; csouthJ[2] = champsJ0;	

			Position pcityJ = new Position(null,cityJ,new Point(33,8));
			Position pchampsJ0= new Position(null,champsJ0,new Point(20,42));
			Position pchampsJ1 = new Position(null,champsJ1,new Point(56,60));
			Position proadJ = new Position(null,roadJ,new Point(53,40));
			
			positionsJ.add(pcityJ);
			positionsJ.add(pchampsJ0);
			positionsJ.add(pchampsJ1);
			positionsJ.add(proadJ);
			
			try {
				vector.add(new Tile(ImageIO.read(new File(path+"tile-j.png")), null,cnorthJ,csouthJ,ceastJ,cwestJ,positionsJ));
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			} catch (Exception e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}

		//tile 3 k
		for(int i=0;i<3;i++){
			Vector<ModelPosition> positionsK = new Vector<ModelPosition>();
			Field champsK0 = new Field();
			Field champsK1 = new Field();
			Town cityK = new Town();
			Path roadK = new Path();

			ModelConstraint[] cnorthK = new ModelConstraint[3];
			cnorthK[0] = champsK0; cnorthK[1] = roadK; cnorthK[2] = champsK1;

			ModelConstraint[] ceastK = new ModelConstraint[3];
			ceastK[0] = cityK; ceastK[1] = cityK; ceastK[2] = cityK;

			ModelConstraint[] cwestK = new ModelConstraint[3];
			cwestK[0] = champsK0; cwestK[1] = roadK; cwestK[2] = champsK1;

			ModelConstraint[] csouthK = new ModelConstraint[3];
			csouthK[0] = champsK1; csouthK[1] = champsK1; csouthK[2] = champsK1;	

			
			Position pchampsK0 = new Position(null,champsK0,new Point(15,14));
			Position proadK = new Position(null,roadK,new Point(36,22));
			Position pchampsK1 = new Position(null,champsK1,new Point(37,56));
			Position pcityK = new Position(null,cityK,new Point(70,33));
			
			positionsK.add(pchampsK0);
			positionsK.add(proadK);
			positionsK.add(pchampsK1);
			positionsK.add(pcityK);

			try {
				vector.add(new Tile(ImageIO.read(new File(path+"tile-k.png")), null,cnorthK,csouthK,ceastK,cwestK,positionsK));
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			} catch (Exception e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}

		//tile 3 l
		for(int i=0;i<3;i++)
		{
			Vector<ModelPosition> positionsL = new Vector<ModelPosition>();
		Field champsL0 = new Field();
		Field champsL1 = new Field();
		Field champsL2 = new Field();
		Town cityL = new Town();
		Path roadL0 = new Path();
		Path roadL1 = new Path();
		Path roadL2 = new Path();

		ModelConstraint[] cnorthL = new ModelConstraint[3];
		cnorthL[0] = champsL0; cnorthL[1] = roadL0; cnorthL[2] = champsL1;

		ModelConstraint[] ceastL = new ModelConstraint[3];
		ceastL[0] = cityL; ceastL[1] = cityL; ceastL[2] = cityL;

		ModelConstraint[] cwestL = new ModelConstraint[3];
		cwestL[0] = champsL0; cwestL[1] = roadL1; cwestL[2] = champsL2;

		ModelConstraint[] csouthL = new ModelConstraint[3];
		csouthL[0] = champsL2; csouthL[1] = roadL2; csouthL[2] = champsL1;			
		
		Position pchampsL0 = new Position(null,champsL0,new Point(14,14));
		Position pchampsL1 = new Position(null,champsL1,new Point(12,60));
		Position pchampsL2 = new Position(null,champsL2,new Point(41,46));
		Position pcityL = new Position(null,cityL,new Point(67,36));
		Position proadL0 = new Position(null,roadL0,new Point(36,15));
		Position proadL1 = new Position(null,roadL1,new Point(9,36));
		Position proadL2 = new Position(null,roadL2,new Point(28,59));
		
		positionsL.add(pchampsL0);
		positionsL.add(pchampsL1);
		positionsL.add(pchampsL2);
		positionsL.add(pcityL);
		positionsL.add(proadL0);
		positionsL.add(proadL1);
		positionsL.add(proadL2);

		try {
			vector.add(new Tile(ImageIO.read(new File(path+"tile-l.png")), null,cnorthL,csouthL,ceastL,cwestL,positionsL));
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		}

		//tile m 2 TO Do bouclier
		for(int i=0;i<2;i++)
		{
			Vector<ModelPosition> positionsM = new Vector<ModelPosition>();
		Field champsM = new Field();
		Town cityM = new Town();
		

		ModelConstraint[] cnorthM = new ModelConstraint[3];
		cnorthM[0] = cityM; cnorthM[1] = cityM; cnorthM[2] = cityM;

		ModelConstraint[] ceastM = new ModelConstraint[3];
		ceastM[0] = champsM; ceastM[1] = champsM; ceastM[2] = champsM;

		ModelConstraint[] cwestM = new ModelConstraint[3];
		cwestM[0] = cityM; cwestM[1] = cityM; cwestM[2] = cityM;

		ModelConstraint[] csouthM = new ModelConstraint[3];
		csouthM[0] = champsM; csouthM[1] = champsM; csouthM[2] = champsM;	

		Position pcityM = new Position(null,cityM,new Point(19,10));
		Position pchampM = new Position(null,champsM,new Point(50,49));
		
		positionsM.add(pchampM);
		positionsM.add(pcityM);
		try {
			vector.add(new Tile(ImageIO.read(new File(path+"tile-m.png")), null,cnorthM,csouthM,ceastM,cwestM,positionsM));
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		}
		//tile 3 n
		for(int i=0;i<3;i++){
			Vector<ModelPosition> positionsN = new Vector<ModelPosition>();
		Field champsN = new Field();
		Town cityN = new Town();

		ModelConstraint[] cnorthN = new ModelConstraint[3];
		cnorthN[0] = cityN; cnorthN[1] = cityN; cnorthN[2] = cityN;

		ModelConstraint[] ceastN = new ModelConstraint[3];
		ceastN[0] = champsN; ceastN[1] = champsN; ceastN[2] = champsN;

		ModelConstraint[] cwestN = new ModelConstraint[3];
		cwestN[0] = cityN; cwestN[1] = cityN; cwestN[2] = cityN;

		ModelConstraint[] csouthN = new ModelConstraint[3];
		csouthN[0] = champsN; csouthN[1] = champsN; csouthN[2] = champsN;	

		Position pcityN = new Position(null,cityN,new Point(19,10));
		Position pchampN= new Position(null,champsN,new Point(50,49));
		
		positionsN.add(pchampN);
		positionsN.add(pcityN);
		
		try {
			vector.add(new Tile(ImageIO.read(new File(path+"tile-n.png")), null,cnorthN,csouthN,ceastN,cwestN,positionsN));
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		}

		//tile 2 o  TO DO bouclier
		for(int i=0;i<2;i++){
			Vector<ModelPosition> positionsO = new Vector<ModelPosition>();
		Field champsO1 = new Field();
		Field champsO2 = new Field();
		Town cityO = new Town();
		Path  roadO = new Path();

		ModelConstraint[] cnorthO = new ModelConstraint[3];
		cnorthO[0] = cityO; cnorthO[1] = cityO; cnorthO[2] = cityO;

		ModelConstraint[] ceastO = new ModelConstraint[3];
		ceastO[0] = champsO1; ceastO[1] = roadO; ceastO[2] = champsO2;

		ModelConstraint[] cwestO = new ModelConstraint[3];
		cwestO[0] = cityO; cwestO[1] = cityO; cwestO[2] = cityO;

		ModelConstraint[] csouthO = new ModelConstraint[3];
		csouthO[0] = champsO1; csouthO[1] = roadO; csouthO[2] = champsO2;	
	
		Position pchampsO1 = new Position(null,champsO1,new Point(43,41));
		Position pchampsO2= new Position(null,champsO2,new Point(65,61));
		Position pcityO = new Position(null,cityO,new Point(13,22));
		Position proadO= new Position(null,roadO,new Point(60,42));
		
		positionsO.add(pchampsO1);
		positionsO.add(pchampsO2);
		positionsO.add(pcityO);
		positionsO.add(proadO);
		try {
			vector.add(new Tile(ImageIO.read(new File(path+"tile-o.png")), null,cnorthO,csouthO,ceastO,cwestO,positionsO));
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		}

		//tile  3 p
		for(int i=0;i<3;i++){
			Vector<ModelPosition> positionsP = new Vector<ModelPosition>();
		Field champsP1 = new Field();
		Field champsP2 = new Field();
		Town cityP = new Town();
		Path  roadP = new Path();

		ModelConstraint[] cnorthP = new ModelConstraint[3];
		cnorthP[0] = cityP; cnorthP[1] = cityP; cnorthP[2] = cityP;

		ModelConstraint[] ceastP = new ModelConstraint[3];
		ceastP[0] = champsP1; ceastP[1] = roadP; ceastP[2] = champsP2;

		ModelConstraint[] cwestP = new ModelConstraint[3];
		cwestP[0] = cityP; cwestP[1] = cityP; cwestP[2] = cityP;

		ModelConstraint[] csouthP = new ModelConstraint[3];
		csouthP[0] = champsP1; csouthP[1] = roadP; csouthP[2] = champsP2;	

		Position pchampsP1 = new Position(null,champsP1,new Point(43,41));
		Position pchampsP2= new Position(null,champsP2,new Point(65,61));
		Position pcityP = new Position(null,cityP,new Point(13,22));
		Position proadP= new Position(null,roadP,new Point(60,42));
		
		positionsP.add(pchampsP1);
		positionsP.add(pchampsP2);
		positionsP.add(pcityP);
		positionsP.add(proadP);
		
		try {
			vector.add(new Tile(ImageIO.read(new File(path+"tile-p.png")), null,cnorthP,csouthP,ceastP,cwestP,positionsP));
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		}

		//tile q TO DO Bouclier
		Field champsQ = new Field();
		Town cityQ = new Town();
		Vector<ModelPosition> positionsQ = new Vector<ModelPosition>();
		
		ModelConstraint[] cnorthQ = new ModelConstraint[3];
		cnorthQ[0] = cityQ; cnorthQ[1] = cityQ; cnorthQ[2] = cityQ;

		ModelConstraint[] ceastQ = new ModelConstraint[3];
		ceastQ[0] = cityQ; ceastQ[1] = cityQ; ceastQ[2] = cityQ;

		ModelConstraint[] cwestQ = new ModelConstraint[3];
		cwestQ[0] = cityQ; cwestQ[1] = cityQ; cwestQ[2] = cityQ;

		ModelConstraint[] csouthQ = new ModelConstraint[3];
		csouthQ[0] = champsQ; csouthQ[1] = champsQ; csouthQ[2] = champsQ;	

		Position pchampsQ = new Position(null,champsQ,new Point(43,62));
		Position pcityQ= new Position(null,cityQ,new Point(44,28));
		
		positionsQ.add(pchampsQ);
		positionsQ.add(pcityQ);
		try {
			vector.add(new Tile(ImageIO.read(new File(path+"tile-q.png")), null,cnorthQ,csouthQ,ceastQ,cwestQ,positionsQ));
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

		//tile  3 r
		for(int i=0;i<3;i++){
			Vector<ModelPosition> positionsR = new Vector<ModelPosition>();
		Field champsR = new Field();
		Town cityR = new Town();

		ModelConstraint[] cnorthR = new ModelConstraint[3];
		cnorthR[0] = cityR; cnorthR[1] = cityR; cnorthR[2] = cityR;

		ModelConstraint[] ceastR = new ModelConstraint[3];
		ceastR[0] = cityR; ceastR[1] = cityR; ceastR[2] = cityR;

		ModelConstraint[] cwestR = new ModelConstraint[3];
		cwestR[0] = cityR; cwestR[1] = cityR; cwestR[2] = cityR;

		ModelConstraint[] csouthR = new ModelConstraint[3];
		csouthR[0] = champsR; csouthR[1] = champsR; csouthR[2] = champsR;	

		Position pchampsR = new Position(null,champsR,new Point(43,62));
		Position pcityR= new Position(null,cityR,new Point(44,28));
		
		positionsR.add(pchampsR);
		positionsR.add(pcityR);
		try {
			vector.add(new Tile(ImageIO.read(new File(path+"tile-r.png")), null,cnorthR,csouthR,ceastR,cwestR,positionsR));
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		}

		//tile 2 s TO DO bouclier et chemin final
		for(int i=0;i<2;i++){
			Vector<ModelPosition> positionsS = new Vector<ModelPosition>();
 		Field champsS1 = new Field();
		Field champsS2 = new Field();
		Town cityS = new Town();
		Path roadS = new Path();

		ModelConstraint[] cnorthS = new ModelConstraint[3];
		cnorthS[0] = cityS; cnorthS[1] = cityS; cnorthS[2] = cityS;

		ModelConstraint[] ceastS = new ModelConstraint[3];
		ceastS[0] = cityS; ceastS[1] = cityS; ceastS[2] = cityS;

		ModelConstraint[] cwestS = new ModelConstraint[3];
		cwestS[0] = cityS; cwestS[1] = cityS; cwestS[2] = cityS;

		ModelConstraint[] csouthS = new ModelConstraint[3];
		csouthS[0] = champsS1; csouthS[1] = roadS; csouthS[2] = champsS2;	

		Position pchampsS1 = new Position(null,champsS1,new Point(26,67));
		Position pchampsS2 = new Position(null,champsS2,new Point(50,64));
		Position pcityS= new Position(null,cityS,new Point(28,16));
		Position proadS= new Position(null,roadS,new Point(38,61));
		
		positionsS.add(pchampsS1);
		positionsS.add(pchampsS2);
		positionsS.add(pcityS);
		positionsS.add(proadS);
		
		try {
			vector.add(new Tile(ImageIO.read(new File(path+"tile-s.png")), null,cnorthS,csouthS,ceastS,cwestS,positionsS));
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		}

		//tile t TO DO chmin final
		Vector<ModelPosition> positionsT = new Vector<ModelPosition>();
		Field champsT1 = new Field();
		Field champsT2 = new Field();
		Town cityT = new Town();
		Path roadT = new Path();

		ModelConstraint[] cnorthT = new ModelConstraint[3];
		cnorthT[0] = cityT; cnorthT[1] = cityT; cnorthT[2] = cityT;

		ModelConstraint[] ceastT = new ModelConstraint[3];
		ceastT[0] = cityT; ceastT[1] = cityT; ceastT[2] = cityT;

		ModelConstraint[] cwestT = new ModelConstraint[3];
		cwestT[0] = cityT; cwestT[1] = cityT; cwestT[2] = cityT;

		ModelConstraint[] csouthT = new ModelConstraint[3];
		csouthT[0] = champsT1; csouthT[1] = roadT; csouthT[2] = champsT2;	

		Position pchampsT1 = new Position(null,champsT1,new Point(26,67));
		Position pchampsT2 = new Position(null,champsT2,new Point(50,64));
		Position pcityT= new Position(null,cityT,new Point(28,16));
		Position proadT= new Position(null,roadT,new Point(42,57));
		
		positionsT.add(pchampsT1);
		positionsT.add(pchampsT2);
		positionsT.add(pcityT);
		positionsT.add(proadT);

		try {
			vector.add(new Tile(ImageIO.read(new File(path+"tile-t.png")), null,cnorthT,csouthT,ceastT,cwestT,positionsT));
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

		//tile 8 u
		for(int i=0;i<8;i++){
			Vector<ModelPosition> positionsU = new Vector<ModelPosition>();
 		Field champsU1 = new Field();
		Field champsU2 = new Field();
		Path roadU = new Path();

		ModelConstraint[] cnorthU = new ModelConstraint[3];
		cnorthU[0] = champsU1; cnorthU[1] = roadU; cnorthU[2] = champsU2;

		ModelConstraint[] ceastU = new ModelConstraint[3];
		ceastU[0] = champsU2; ceastU[1] = champsU2; ceastU[2] = champsU2;

		ModelConstraint[] cwestU = new ModelConstraint[3];
		cwestU[0] = champsU1; cwestU[1] = champsU1; cwestU[2] = champsU1;

		ModelConstraint[] csouthU = new ModelConstraint[3];
		csouthU[0] = champsU1; csouthU[1] = roadU; csouthU[2] = champsU2;	

		Position pchampsU1 = new Position(null,champsU1,new Point(16,44));
		Position proadU= new Position(null,roadU,new Point(41,39));
		Position pchampsU2= new Position(null,champsU2,new Point(59,29));
		
		positionsU.add(pchampsU1);
		positionsU.add(pchampsU2);
		positionsU.add(proadU);
		
		try {
			vector.add(new Tile(ImageIO.read(new File(path+"tile-u.png")), null,cnorthU,csouthU,ceastU,cwestU,positionsU));
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		}
		//tile 10 v
		for(int i=0;i<10;i++){
			Vector<ModelPosition> positionsV = new Vector<ModelPosition>();
 		Field champsV1 = new Field();
		Field champsV2 = new Field();
		Path roadV = new Path();

		ModelConstraint[] cnorthV = new ModelConstraint[3];
		cnorthV[0] = champsV1; cnorthV[1] = champsV1; cnorthV[2] = champsV1;

		ModelConstraint[] ceastV = new ModelConstraint[3];
		ceastV[0] = champsV1; ceastV[1] = champsV1; ceastV[2] = champsV1;

		ModelConstraint[] cwestV = new ModelConstraint[3];
		cwestV[0] = champsV1; cwestV[1] = roadV; cwestV[2] = champsV2;

		ModelConstraint[] csouthV = new ModelConstraint[3];
		csouthV[0] = champsV2; csouthV[1] = roadV; csouthV[2] = champsV1;	

		Position pchampsV1 = new Position(null,champsV1,new Point(17,53));
		Position proadV= new Position(null,roadV,new Point(37,48));
		Position pchampsV2= new Position(null,champsV2,new Point(56,31));
		
		positionsV.add(pchampsV1);
		positionsV.add(pchampsV2);
		positionsV.add(proadV);
		try {
			vector.add(new Tile(ImageIO.read(new File(path+"tile-v.png")), null,cnorthV,csouthV,ceastV,cwestV,positionsV));
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		}

		//tile 3 w TO Do chemin final
		for(int i=0;i<3;i++){
			Vector<ModelPosition> positionsW = new Vector<ModelPosition>();
 		Field champsW1 = new Field();
		Field champsW2 = new Field();
		Field champsW3 = new Field();
		Path roadW1 = new Path();
		Path roadW2 = new Path();
		Path roadW3 = new Path();

		ModelConstraint[] cnorthW = new ModelConstraint[3];
		cnorthW[0] = champsW1; cnorthW[1] = champsW1; cnorthW[2] = champsW1;

		ModelConstraint[] ceastW = new ModelConstraint[3];
		ceastW[0] = champsW1; ceastW[1] = roadW1; ceastW[2] = champsW2;

		ModelConstraint[] cwestW = new ModelConstraint[3];
		cwestW[0] = champsW1; cwestW[1] = roadW2; cwestW[2] = champsW3;

		ModelConstraint[] csouthW = new ModelConstraint[3];
		csouthW[0] = champsW3; csouthW[1] = roadW3; csouthW[2] = champsW2;	

		Position pchampsW1 = new Position(null,champsW1,new Point(38,13));
		Position pchampsW2= new Position(null,champsW2,new Point(18,56));
		Position pchampsW3= new Position(null,champsW3,new Point(57,56));
		Position proadW1 = new Position(null,roadW1,new Point(10,35));
		Position proadW2= new Position(null,roadW2,new Point(37,60));
		Position proadW3= new Position(null,roadW3,new Point(65,33));
		
		positionsW.add(pchampsW1);
		positionsW.add(pchampsW2);
		positionsW.add(pchampsW3);
		positionsW.add(proadW1);
		positionsW.add(proadW2);
		positionsW.add(proadW3);
		
		try {
			vector.add(new Tile(ImageIO.read(new File(path+"tile-w.png")), null,cnorthW,csouthW,ceastW,cwestW,positionsW));
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		}

		//tile x TO Do chemin final 
		Field champsX1 = new Field();
		Field champsX2 = new Field();
		Field champsX3 = new Field();
		Field champsX4 = new Field();
		Path roadX1 = new Path();
		Path roadX2 = new Path();
		Path roadX3 = new Path();
		Path roadX4 = new Path();
		Vector<ModelPosition> positionsX = new Vector<ModelPosition>();

		ModelConstraint[] cnorthX = new ModelConstraint[3];
		cnorthX[0] = champsX1; cnorthX[1] = roadX1; cnorthX[2] = champsX2;

		ModelConstraint[] ceastX = new ModelConstraint[3];
		ceastX[0] = champsX2; ceastX[1] = roadX2; ceastX[2] = champsX3;

		ModelConstraint[] cwestX = new ModelConstraint[3];
		cwestX[0] = champsX1; cwestX[1] = roadX3; cwestX[2] = champsX4;

		ModelConstraint[] csouthX = new ModelConstraint[3];
		csouthX[0] = champsX4; csouthX[1] = roadX4; csouthX[2] = champsX4;	

		Position pchampsX1 = new Position(null,champsX1,new Point(16,16));
		Position pchampsX2= new Position(null,champsX2,new Point(16,55));
		Position pchampsX3= new Position(null,champsX3,new Point(57,57));
		Position pchampsX4 = new Position(null,champsX4,new Point(59,16));
		Position proadX1= new Position(null,roadX1,new Point(8,35));
		Position proadX2= new Position(null,roadX2,new Point(35,59));
		Position proadX3= new Position(null,roadX3,new Point(59,41));
		Position proadX4= new Position(null,roadX4,new Point(40,18));
		
		positionsX.add(pchampsX1);
		positionsX.add(pchampsX2);
		positionsX.add(pchampsX3);
		positionsX.add(pchampsX4);
		positionsX.add(proadX1);
		positionsX.add(proadX2);
		positionsX.add(proadX3);
		positionsX.add(proadX4);
		
		
		try {
			vector.add(new Tile(ImageIO.read(new File(path+"tile-x.png")), null,cnorthX,csouthX,ceastX,cwestX,positionsX));
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return vector;
	}

	@Override
	public String getNameExpansion() {
		return "Base";
	}




}
